/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entitys;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity

public class Appointment implements Serializable {
    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name="IdAppointment")
    private Long IdAppointment;
    @Temporal(TemporalType.DATE)
    private Date date;
    @Column(length = 15)
    private int charge;
    @Column(length = 15)
    private String notes;
    @ManyToOne(cascade=CascadeType.PERSIST)
    private Veterinarian veterinarian;
    @ManyToOne(cascade=CascadeType.PERSIST)
    private MedicalRecord medicalrecord;


    
    public Appointment(){
        super();
    }
    public Date getdate(){
        return date;
    }
    public void setdate(Date date){
        this.date = date;
    }
    public int getcharge(){
        return charge;
    }

    public Long getIdAppointment() {
        return IdAppointment;
    }

    public void setIdAppointment(Long IdAppointment) {
        this.IdAppointment = IdAppointment;
    }
    public void setcharge(int charge){
        this.charge = charge;
    }
    public String getnotes(){
        return notes;
    }
    public void setnotes(String notes){
        this.notes = notes;
    }
}
